import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
    {
        path: '/',
        name: 'home',
        component: () => import('@/views/index.vue'),
        redirect: '/link',
        children: [
            {
                path: '/link',
                name: 'link',
                component: () => import('@/views/link/index.vue')
            },
            {
                path: '/state',
                name: 'state',
                component: () => import('@/views/link/linkState/index.vue')
            },
            {
                path: '/admin',
                name: 'Admin',
                component: () => import('@/views/admin/main/index.vue')
            },
            {
                path: '/linkSuccess',
                name: 'linkSuccess',
                component: () => import('@/views/link/linkSuccess.vue')
            },
            {
                path:'/nat',
                name:'nat',
                component:()=>import("@/views/nat/nat.vue")
            },
            {
                path:'/config',
                name:'config',
                component:()=>import("@/views/config/config.vue")
            }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router